$wh: 12px;

[data-drag] {
    cursor: move;
}

.drag-cancel:hover {
    cursor: not-allowed;
}

.drag-handle,
.drag-cancel {
    padding: 6px;
    margin: 6px;
    background-color: #ccc;
    border: none solid #ccc;
}

.vdr {
    touch-action: none;
    position: absolute;
    box-sizing: border-box;
    margin: 0;
}

// .active {
//     border: 1px solid var(--primary);
// }

/* 激活后的组件 */
.drag-active {
    outline: 1px solid #49b6ff67 !important;
}
.handle {
    box-sizing: border-box;
    position: absolute;
    width: $wh;
    height: $wh;
    min-height: 1px;
    min-width: 1px;
    border: 1px solid var(--primary);
    background-color: var(--primary);
    z-index: 100;
    // border-radius: 50%;
    margin: 0;
}
/* 右上 */
.handle-tl {
    transform: translate(calc(-50%), -50%);
    cursor: nw-resize;
}
/* 上中 */
.handle-tm {
    width: calc(100% - 12px);
    transform: translate(6px, -50%);
    cursor: n-resize;
    height: 2px;
    background-color: transparent;
    border: none;
}
/* 右上 */
.handle-tr {
    left: 100%;
    transform: translate(-50%, -50%);
    cursor: ne-resize;
}
/* 中左 */
.handle-ml {
    top: 0;
    top: 6px;
    height: calc(100% - 12px);
    width: 2px;
    left: -1px;
    background-color: transparent;
    border: none;
    cursor: w-resize;
}
/* 中右 */
.handle-mr {
    height: calc(100% - 12px);
    top: 6px;
    width: 2px;
    right: -2px;
    cursor: e-resize;
    background-color: transparent;
    border: none;
}

/* 下左 */
.handle-bl {
    top: 100%;
    cursor: sw-resize;
    transform: translate(-50%, -50%);
}

/* 下中 */
.handle-bm {
    bottom: 0px;
    height: 3px;
    width: calc(100% - 12px);
    transform: translate(6px, 50%);
    background-color: transparent;
    border: none;
    cursor: s-resize;
}
/* 下右 */
.handle-br {
    top: 100%;
    left: 100%;
    cursor: se-resize;
    transform: translate(-50%, -50%);
}

@media only screen and (max-width: 768px) {
    [class*="handle-"]:before {
        content: "";
        left: -6px;
        right: -6px;
        bottom: -6px;
        top: -6px;
        position: absolute;
    }
}
